package cn.jsj.dispose;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 删除律师助理信息处理类
 * @author LI
 *
 */
 public class DeleteAssistInfo extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
	 public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// 调试信息
			cn.jsj.utils.SysLogger.PrintInfo("删除律师助理信息！！！！！！！");

			//获取要删除律师的ID
			int assistId=Integer.parseInt(request.getParameter("assistID"));

			//调试信息
			cn.jsj.utils.SysLogger.PrintInfo("获得的参数 assistID----->"+assistId);

			//删除律师信息
			 cn.jsj.dao.TblLawyAssistantDAO tlad=new cn.jsj.dao.TblLawyAssistantDAO();
			int  deleteSuccess= tlad.deleteLawyerAssistInfo(assistId);
			//调试信息
			cn.jsj.utils.SysLogger.PrintInfo("删除结果是----------->"+deleteSuccess);

			//输出信息到客户端
			java.io.PrintWriter out=response.getWriter();
			if(deleteSuccess==1){
				out.println("{message:'删除成功！！！'}");
			}
			else{
				out.println("{message:'删除失败！！！'}");
			}
			out.flush();
			out.close();
	}
}